/*
 * @Author: 赛罗
 * @Date: 2024-02-27 17:34:03
 * @LastEditors: 赛罗
 * @LastEditTime: 2024-03-25 15:50:01
 * @FilePath: \haixiaoke-management-reconstruction\src\api\sys-enterprise\account.js
 * @Description:
 */
import request from "@/utils/request";

// 机构里账号列表查询
export function pageByDep(query) {
  return request({
    url: "/manage/user/userBusiness/pageByDep",
    method: "get",
    params: query,
  });
}

// 机构添加用户
export function addUserBusiness(data){
  return request({
    url:'/manage/user/userBusiness/add',
    method: 'post',
    data
  })
}
// 根据用户id查询用户详细信息
export function getUserBusiness(params){
  return request({
    url:'/manage/user/userBusiness',
    method: 'get',
    params:params
  })
}
// 机构编辑用户
export function updateUserBusiness(data){
  return request({
    url:'/manage/user/userBusiness',
    method: 'put',
    data
  })
}
// 删除机构下的指定用户
export function deleteUserBusiness(data){
  return request({
    url:'/manage/user/userBusiness/byDep',
    method: 'delete',
    data:data
  })
}

export function updatePassword(data){
  return request({
    url:'/manage/user/userBusiness/updatePassword',
    method:'put',
    data
  })
}

// 检测账号是否有名称
export function checkUserMobile(mobile) {
  return request({
    url: '/manage/user/userBusiness/checkUser/' + mobile,
    method: 'get'
  })
}
